<?php
class Col_Sx extends TdPage {
	
	public $id_usr;
	public $welcome;
	public $rate;
	public $ability;
	public $skill;
	public $lessons;
	
	function __construct($template) {
		parent::__construct("", $template);
		
		
		if (isset($_SESSION["user"])) {
			$user = $_SESSION["user"];
		
			$this->id_usr = $user->getId();			
		
		} else {
			// do something			
		}
		
		$this->doInit();
		
	}
	
	
	
	function doInit() {
		
		$utility = new cl_Utility();
		$this->welcome = $utility->doGetLogin();
		$this->rate = $utility->Getmyrate();
		
		$user = new cl_User("id", $this->id_usr);
		$this->ability = $user->getAbility(3);
		$this->skill = $user->getSkill(3);
		
		$lesson = new cl_Lesson("id_user", $this->id_usr);
		$this->lessons = $lesson->getLessons(5);
		
	}
	
	
	
}
?>